package main.java.service.impl;

import main.java.dao.UserDao;
import main.java.pojo.User;
import main.java.service.UserService;

import java.util.List;


public class UserServiceImpl implements UserService {


    UserDao userDao;


    @Override
    public List<User> findAll(User user, int offset, int pageSize) {

        return userDao.findAll(user,offset,pageSize);
    }

    @Override
    public int addUser(User user) {
        return userDao.addUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return userDao.deleteUser(id);
    }

    @Override
    public User findUserById(int id) {
        return userDao.findUserById(id);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int count(User user) {
        return userDao.count(user);
    }
}
